//
//  FrameModel.swift
//  CTAssistant
//
//  Created by Kevin on 2023/2/16.
//

import UIKit
import HandyJSON
import RealmSwift

class RCMessage: NSObject {
    var isQ: Bool = true
    var sentTime: Int = 0
    var content: String?
    var type: ChatGPTType?
    var user: RCUserInfo?
}

class RCUserInfo: NSObject {
    var userId: String?
    var nickname: String?
    var avatar: String?
}

class ChayMsgModel: Object {

    @objc dynamic var msgId = ""
    @objc dynamic var type = ChatGPTType.chat.rawValue
    @objc dynamic var isQ = true
    @objc dynamic var sentTime = 0
    @objc dynamic var content = ""
    @objc dynamic var userId = ""
    @objc dynamic var nickname = ""
    @objc dynamic var avatar = ""

    @objc dynamic var isHideTime = false
    @objc dynamic var rowHeight = 0.0
    
    override static func primaryKey() -> String? {
        return "msgId"
    }
}
